package com.cathaypacific.sample.auth

import android.app.Application
import com.cathaypacific.sample.auth.facebook.widget.CrashHandler
import com.facebook.FacebookSdk
import com.cathaypacific.facebook.login.utils.MetaUtils


/**
 * Created by roy.. on 4/2/2018.
 */
class AuthApp :Application(){
    val FBId = "com.facebook.sdk.ApplicationId"

    override fun onCreate() {
        super.onCreate()
        //dynamic modify facebookId
        CrashHandler().setCustomCrashHanler(applicationContext)
        FacebookSdk.setApplicationId(MetaUtils.getMeta(this,FBId));
        FacebookSdk.setAutoLogAppEventsEnabled(false)
        FacebookSdk.sdkInitialize(this)
    }

}